<?php

namespace Modules\Buy\Entities;

use Illuminate\Database\Eloquent\Model;

class Orderlist extends Model
{
    protected $guarded = [];

//    订单列表关联商品，为多对一
    public function good(){
        return $this->belongsTo(Good::class,'good_id','id');
    }


//    订单列表关联货品
    public function huowu()
    {
        return $this->belongsTo(Huowu::class,'huowu_id','id');
    }

//    订单列表关联订单表
    public function ding()
    {
        return $this->belongsTo(Order::class,'orderId','orderId');
    }

}
